package com.softtown.modules.workflow.dao;

import com.softtown.common.dao.BaseDao;
import com.softtown.modules.workflow.entity.SwfProcInstEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: Dingyayong
 * @Date: 2019/8/21 19:51
 * @Description:
 */
@Mapper
public interface SwfProcInstDao extends BaseDao<SwfProcInstEntity> {

    /**
     * 通过公司id 和申请单id找出对应的唯一流程实例
     *
     * @param compId
     * @param applId
     * @return SwfProcInstEntity
     * @author Dingyayong
     * @date 2019/8/22 10:08
     */
    SwfProcInstEntity getSwfProcInst(@Param("compId") Long compId, @Param("applId") Long applId);

    /**
     * 通过id找出对应的唯一流程实例
     *
     * @param id
     * @return SwfProcInstEntity
     * @author Dingyayong
     * @date 2019/8/26 14:49
     */
    SwfProcInstEntity getSwfProcInstById(Long id);

    /**
     * 更新流程实例
     *
     * @param swfProcInstEntity
     * @return void
     * @author Dingyayong
     * @date 2019/8/26 14:49
     */
    void updateSwfProcInst(SwfProcInstEntity swfProcInstEntity);
}
